#ifndef DEVICECARD_H
#define DEVICECARD_H

#include "Models/DeviceInformation.h"

#include <QWidget>
#include <QMessageBox>
#include <QFont>
#include <QStyleOption>
#include <QPainter>

namespace Ui {
class DeviceCard;
}

class DeviceCard : public QWidget
{
    Q_OBJECT

public:
    explicit DeviceCard(QWidget *parent = nullptr);
    explicit DeviceCard(DeviceInformation* device, QWidget *parent = nullptr);
    ~DeviceCard();

    QMessageBox::StandardButton showDeleteConfirmBox(QWidget *parent, const QString &deviceName);
private slots:
    void on_pushButton_delete_clicked();

    void on_pushButton_edit_clicked();
    void on_pushButton_connect_clicked();

    void on_pushButton_setState_clicked();

signals:
    void updateUi();
private:
    Ui::DeviceCard *ui;
    DeviceInformation* device_info;
    QString greenButtonStyle;
    QString redButtonStyle;
    QString greenFontLabel;
    QString redFontLabel;
    void InitStyle();
};

#endif // DEVICECARD_H
